-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add special case for Homebrew #6
Conversation
Looks like the tests won't run on Node.js v4. I can add a commit to drop v4 from |
another approach would just be to just look for |
@sindresorhus (ping) I could use some direction here; there's a couple ways to go and I'm not sure which you'd prefer. The choices are:
|
@boneskull @sindresorhus I think we could drop support for Node.js 4. Just do it. Sindre already. Sindre has removed support for Node.js 4 in many of his repositories. |
I would prefer |
920857b
to
7f83822
Compare
@sindresorhus OK, this should be ready. I tried to add OSX to the build matrix and install node using homebrew, but was running in to trouble and don't have the time to hack on it further atm. Before this change:
After this change:
|
Once this is released, I'll update create-yo to use this module. |
I'll do a new release once the other open PRs are merged. |
After poking at this a bit further, I found we'd need extra I/O to make this work in every case.
If, for example, your executable is
ava
, we can't useprocess.env._
because it points to/path/to/ava
. If we instead rannode node_modules/.bin/ava
, thenprocess.env._
would point tonode
in yourPATH
.I've updated the code to check if
node
is indeed what the user executed; if that's the case, we can useprocess.env._
to get at its path. Otherwise, we just useprocess.execPath
. On my system, this is still incorrect when runningava
.If we wanted this to always work, we'd need to use
which
or something to that effect, and I assume you don't want to be invokingchild_process.anything()
here.